
#ifndef _MEMBER_BTABLEITEM_H_
#define _MEMBER_BTABLEITEM_H_

#include <BIcon>
#include <BImage>
#include <BWidget>
#include <BGridLayout>
#include <BTableItem>
#include <BTableWidget>
#include "ITextBlock.h"
#include "IAlignment.h"
#include "member_BTableWidget.h"

#define item_member(item)		((member_BTableItem*)((BTableItem*)item)->_ptr)

namespace BWE
{
	class member_BTableItem : public IAlignment
	{
		friend BTableItem;
	public:
		member_BTableItem(BTableItem* tableItem);
		~member_BTableItem();

		void dirtyCell();
		void freshSize(const BFont* font);
		void adjustRect(int x, int y, int w, int h);

		bool empty() const;
		bool ignored() const;

		BTableItem*			boss;
		BTableWidget*		table;
		int					row;
		int					column;
		BColor				color;
		Graph				graph;
		BImageHolder		image;
		BIconHolder			icon;
		BWidgetHolder		widget;
		BSize				iconSize;
		bool				lineFeed;
		ITextBlock			block;
		
		bool				dirty;
		bool				selected;
		BRect				rect;
		BSize				hintSize;
	};
}

#endif